{include file="public/header" /}
<div class="container padding-top">
	<div class="line" style="height:100%;">
		<div class="x1 padding" style="width:336px">
			<div style="background:url('__ROOT__/static/public/images/webp.webp') no-repeat;background-size: 100%;height:550px;width:100%;text-align:center">
				<iframe scrolling=no style="width: 215px;margin: 97px 0px 0px 3px;height: 370px;" src="{:url('seller/index/preview')}?type=seller_detail"></iframe>
			</div>
		</div>
		<div class="x3 padding" style="width:784px;border-left:1px solid #ddd">
			<div>
				<form method="post" class="form-x" style="border:none" action="">
					<div>
						
						<strong>{:lang('sellerinfo')}</strong>
						<hr/>						
						<br/>
						<script>
							//city canshu
							var pid='{$data.pid}';
							var cid='{$data.cid}';
							var aid='{$data.aid}';
							var selectc=true;
							var selecta=true;
						</script>
						<div class="form-group">
							<div class="label">
								<label for="name">{:lang('city')}</label>
							</div>
								<div class="field">
								{include file="public/city" /}
								</div>
						</div>
						<div class="form-group">
						<div class="input-inline clearfix">
							<div class="label">
								<label for="headimg">{:lang('headimg')}</label>
							</div>
							<div class="field">
								<input type="text" readonly class="input input-auto" id="headimg" name="headimg" value="{$data.headimg}" size="65" placeholder="{:lang('headimg')}" data-validate="required:{:lang('required')}" />
								<span class="addbtn"><button type="button" data-id="headimg" class="button upload">{:lang('file')}</button></span>
							</div>
						</div>
						</div>
						<div class="form-group">
							<div class="label">
								<label for="name">{:lang('name')}</label>
							</div>
							<div class="field">
								<input type="text" class="input input-auto" id="name" name="name" value="{$data.name}" size="80" placeholder="{:lang('name')}" data-validate="length#<=15:{:lang('length')}5,required:{:lang('required')}" />
							</div>
						</div>
						<div class="form-group">
							<div class="label">
								<label for="phone">{:lang('phone')}</label>
							</div>
							<div class="field">
								<input type="text" class="input input-auto" id="phone" name="phone" value="{$data.phone}" size="65" placeholder="{:lang('phone')}" />
								<span class="addbtn"><button type="button" data-id="phone" class="bg-green button mod_phone">{:lang('mod')}</button></span>
							</div>
						</div>
						<div class="form-group">
							<div class="label">
								<label for="password">{:lang('password')}</label>
							</div>
							<div class="field">
								<input type="password" class="input input-auto" id="password" name="password" size="65" placeholder="{:lang('password')}" />
								<span class="addbtn"><button type="button" data-id="password" class="bg-green button mod_password">{:lang('mod')}</button></span>
							</div>
						</div>
						
						<div class="form-button">
							<button class="button bg-main" type="submit">{:lang('submit')}</button>
						</div>
						<br/>
						</div>
				</form>
			</div>
		</div>
	</div>
</div>
<script>
	layer.config({
		extend: 'extend/layer.ext.js'
	}); 
	$('.mod_password').click(function(){
		var ch_reg = /^[u4E00-u9FA5{u-z}]+$/;
		var password = $('#password').val(); 
		if(!password){
			layer.msg("{:lang('password')}{:lang('required')}");return false;  
		}else if(!ch_reg.test($.trim(password))){  
			layer.msg("{:lang('no_ch')}");return false;  
		}else if(password.length<6){
			layer.msg("{:lang('passlength')}");return false;  
		}else{
			layer.prompt({title:"{:lang('old')}{:lang('password')}"},function(val){
				$.getJSON("{:url('/seller/index/ajax_mod_password')}?old="+val+"&new="+password,function(data){
					if(data.code == 'success'){
						msg(data.msg,1);
						location.href="{:url('/seller/login')}";
					}else{
						msg(data.msg,2);
					}
				});
			});
		}
	});
	$('.mod_phone').click(function(){
		layer.msg("{:lang('server')}");return false;  
	}); 
</script>
{include file="public/footer" /}